﻿using Less.Core;
using Less.Core.Model;

namespace Less.DAL
{
    internal class IdentifiersDAL : GenericDAL<Identifier>
    {
        internal IdentifiersDAL(IDatabase database)
            : base(database, "Identifiers")
        {
        }

        internal IdentifiersDAL()
            : base(new Database(LessDatabaseUtils.LessConnectionStringName), "Identifiers")
        {
        }



        internal Identifier SelectByGUID(string guid)
        {
            Identifier record = null;
            record = Database.Select<Identifier>(string.Format("SELECT * FROM {0} WHERE GUID=@0", TableName), guid);
            return record;
        }
    }
}